package com.ciwong.epaper.modules.epaper.bean;

import com.ciwong.mobilelib.bean.BaseBean;

import java.util.List;

/**
 * 书籍目录
 *
 * @author bin
 * @version ciwong v.1.0 2015/7/28 10:28
 * @since ciwong v.1.0
 */
public class CatalogueInfo extends BaseBean {

    /**
     * 所有的章节
     */
    public static final int LIST_ALL = 1;

    /**
     * 正在下载的章节
     */
    public static final int LIST_DOWNLOADING = 2;

    /**
     * 已下载的章节
     */
    public static final int LIST_COMPLETED = 3;

    private static final long serialVersionUID = -333915998896622844L;
    /**
     * 目录ID
     */
    private String id;

    /**
     * 目录名称
     */
    private String name;

    /**
     * 离线包下载地址
     */
    private String downLoadUrl;

    /**
     * 离线包HASH值
     */
    private String hash;
    /**
     * isPublish: 0未布置过，1布置过
     */
    private int isPublish;

    /**
     * 区分新旧资源分包模式
     * 1 新资源，0旧资源
     */
    private int type;

    /**
     * 是否加密 0为不加密  1 为加密
     */
    private int isPwd;

    public void setType(int type) {
        this.type = type;
    }


    public int getType() {
        return type;
    }

    /**
     * 目录子节点
     */
    private List<CatalogueInfo> children;

    public CatalogueInfo() {

    }

    public CatalogueInfo(String id, String name) {
        this.id = id;
        this.name = name;
    }

    public int getIsPublish() {
        return isPublish;
    }

    public void setIsPublish(int isPublish) {
        this.isPublish = isPublish;
    }

    /**
     * 文件大小
     */
    private String fileSize;

    //目录子节点是否免费（三级目录中都会有此判断）（1:免费 0:收费）
    private int isFree;

    private Boolean isSelect;

    public Boolean getSelect() {
        return isSelect;
    }

    public void setSelect(Boolean select) {
        isSelect = select;
    }

    public int getIsFree() {
        return isFree;
    }

    public void setIsFree(int isFree) {
        this.isFree = isFree;
    }

    public String getFileSize() {
        return fileSize;
    }

    public void setFileSize(String fileSize) {
        this.fileSize = fileSize;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<CatalogueInfo> getChildren() {
        return children;
    }

    public void setChildren(List<CatalogueInfo> children) {
        this.children = children;
    }

    public String getDownLoadUrl() {
        return downLoadUrl;
    }

    public void setDownLoadUrl(String downLoadUrl) {
        this.downLoadUrl = downLoadUrl;
    }

    public String getHash() {
        return hash;
    }

    public void setHash(String hash) {
        this.hash = hash;
    }

    public int getIsPwd() {
        return isPwd;
    }

    public void setIsPwd(int isPwd) {
        this.isPwd = isPwd;
    }

    /**
     * 资源类型ID常量类
     *
     * @author bin
     */
    public static class PackageMode {

        public static final int PACKAGE_MODE_NEW = 1;
        public static final int PACKAGE_MODE_OLD = 0;

    }
}
